package com.yangyang.ralearn.net.message;

import org.jboss.netty.channel.Channel;

import com.yangyang.ralearn.common.JEnvironment;
import com.yangyang.ralearn.net.serialize.ISerizlizable;
import com.yangyang.ralearn.server.JSimulator;

/**
 * 所有发送消息的基类
 * 
 * @author yangyang
 * 
 */
public abstract class AbstractMessage implements ISerizlizable {

	private int id;// 每一个消息的唯一消息号

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

	@Override
	public int getKey() {
		// TODO Auto-generated method stub
		return this.id;
	}


	public abstract void Do(int id, Channel channel, JEnvironment environment,
			JSimulator simulator);

}
